package com.fairytask.ui
{
	import com.fairytask.engine.components.ToolTips;
	import com.fairytask.engine.components.clip.Clip;
	import com.fairytask.engine.define.ResConfig;
	import com.fairytask.managers.TipsManage;
	import com.fairytask.ui.base.FrameUI;
	
	import flash.events.MouseEvent;
	
	/**
	 * 万灵塔掉落物品
	 * @author pangj
	 */
	public class LoseGoodsUI extends FrameUI
	{
		public var goodImg:Clip;   //掉落物品图标
		public var goodID :String; //物品ID
		public function LoseGoodsUI(popUI:Boolean=true)
		{
			super(popUI);
			initEvent();
		}
		private function initEvent():void
		{
			goodImg.addEventListener(MouseEvent.ROLL_OVER,function(evt:MouseEvent):void
			{
				TipsManage.ShowItemTips(int(goodID));
			});
			goodImg.addEventListener(MouseEvent.ROLL_OUT,function(evt:MouseEvent):void
			{
				ToolTips.hide();
			});
		}
		public function set GoodImg(val:String):void
		{
			goodID = val;
			goodImg.source = ResConfig.iconPath+val+ResConfig.iconImg;
		}
	}
	
}